using System.Collections.Generic;
using System.Linq;

namespace ECommerce.Web.Models
{
    public class Category : Entity
    {
        public virtual Category Parent { get; set; }
        public virtual string Name { get; set; }
        public virtual string Description { get; set; }

        private IList<Category> children = new List<Category>();

        public virtual IEnumerable<Category> Children
        {
            get { return this.children; }
            protected set { this.children = value.ToList(); }
        }
    }
}